<template>
	<view class="content">
		
		<view class="my" @click="setmy">
			<image :src="$host+src" mode="widthFix"></image> 
			<view class="name">
				 <view class="one">{{name}}</view>
				 <view class="two">会员号：{{number}}</view>
			</view>
		</view>
		 <view class="line"></view>
		 <view class="address" @click="address">收货地址管理</view>
		  <view class="line"></view>
		  	 <view class="address">账号安全</view>
			   <view class="line"></view>
			    <view class="address">条款与证照</view>
				<view class="bigline"></view>
				 <view class="exit" @click="exit">退出账号</view>
				 <view class="footer">
				 	
				 </view>
			
	</view>
	
</template>

<script>
		
	export default{
		data(){
				 
			 return{
				 $host:this.$host,
				 src:"",
				  name:"",
				  number:""
			 }
		},
		onShow() {
				this.$request("/getUserData","post",{}).then(res=>{
					     this.src=res.data[0].src
						 this.name=res.data[0].name
						 this.number=res.data[0].number
				})
		},
		methods:{
			setmy(){
				uni.navigateTo({
					url:"/pages/mine/setmyself"
				})
			},
			 address(){
				  uni.navigateTo({
				  	url:"/pages/shopCars/address"
				  })
			 },
			 exit(){
				 	this.$request("/userstate","post",{state:false})
				   uni.switchTab({
				   	url:"/pages/index/index"
				   })
			 }
		}
		 
	}
	
</script>

<style>
		.exit{
			height: 50px;
			line-height: 50px;
			text-align: center;
		}
	.footer{
		width: 100%;
		height: 312px;
		background-color: #f7f7f7;
	}
	.bigline{
		 width: 100%;
		 height: 14px;
		 background-color: #f7f7f7;
	}	
	.address{
		height: 50px;
		line-height: 50px;
		margin-left: 20rpx;
	}
	.one{
		position: relative;
		top: 9px;
		margin-left: 10rpx;
	}
		
	.two{
		color:#bababa;
		font-size: 9px;
		position: relative;
		top: 23rpx;
		left: 10rpx;
	}
	.line{
		width: 100%;
		height: 1rpx;
		background-color: #f4f4f4;
				margin-top: 10rpx;
	}
	.my{
		display: flex;
		margin-top: 20rpx;
		margin-left: 20rpx;
	
	}
	.name{
		display: flex;
		flex-direction: column;
	}
	.my image{
			width: 48px;
			border-radius: 50%;
	}
</style>